package com.zr.share.enums;

/**
 * @ClassName TaxEnum
 * @Description TODO
 * @Author Jiakui_Ma
 * @Date 2019/11/14 15:41
 */
public enum TaxEnum {

    containTax("含税", 1),
    noContainTax("不含税", 0);
    // 成员变量
    private String name;
    private int index;

    TaxEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }
    public static String getName(int index) {
        for (TaxEnum c : TaxEnum.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
